/*
 * @Author: Li Zengkun
 * @Date: 2022-09-26 19:27:38
 * @LastEditors: Li Zengkun
 * @LastEditTime: 2022-09-28 10:10:03
 * @Description: 
 */
import axios from "axios";

const remove = (id, params) => axios.delete(`/category/${id}`, { params })

const update = (id, data) => axios.put(`/category/${id}`, data)

const addChild = (data) => axios.post('/category', data)

const getChild = (params) => axios.get("/category/sub", { params })

const getAll = (params) => axios.get("/category/all", { params })

export default {
    remove,
    update,
    addChild,
    getChild,
    getAll
}